package cn.wolfcode.mapper;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.domain.Notice;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    List<Employee> selectForList(QueryObject qo);

    //插入关联表数据
    void insertRelation(@Param("eid") Long eid, @Param("rid") Long rid);

    //删除关联表数据
    void deleteRelation(Long id);

    Employee queryByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    Employee queryByUsername(String username);

    Employee queryPasswordById(Long id);

    void updatePassword(@Param("id") Long id, @Param("newPassword") String newPassword);

    void updatePasswordById(@Param("id") Long id, @Param("password") String password);

    boolean queryStatusByUsername(String username);

    void updateStatusById(@Param("id") Long id, @Param("status") boolean status);

}